package Buttons 
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.media.Sound;
	import ScreensManager.ScreenManager;
	/**
	 * ...
	 * @author ...
	 */
	public class ButtonScreen extends Button
	{
		private var screenReference:int;
		private var audio:Sound;
		
		public function ButtonScreen(btnReference:MovieClip, screens:int, x:int, y:int, btnAudio:Sound=null) 
		{
			super(btnReference, x, y);
			this.audio = btnAudio;
			this.screenReference = screens;
		}
		
		override protected function MouseDown(e:MouseEvent):void 
		{
			Play();
			
			ScreenManager.setCurrentScreen(screenReference);
		}
		
		protected function Play() 
		{
			if (this.audio != null)
			{
				this.audio.play();
			}
		}
	}
}